/***********************************************************************
 * piezometer.h
 * Copyright (C) Muhammad Fauzilkamil Zainuddin <jerungkun@gmail.com>
 * http://coderstalk.blogspot.com
 * 
 * Piezometer header
 * 
 ***********************************************************************/

#include <stdio.h>   /* Standard input/output definitions */
#include <string.h>  /* String function definitions */
#include <unistd.h>  /* UNIX standard function definitions */
#include <fcntl.h>   /* File control definitions */
#include <errno.h>   /* Error number definitions */
#include <termios.h> /* POSIX terminal control definitions */
#include <stdlib.h> 
#include <time.h>

#include <sys/signal.h>
#include <sys/types.h>

#define BAUDRATE B115200
#define SERIALPORT "/dev/ttyAM1"
#define _POSIX_SOURCE 1 /* POSIX compliant source */
#define FALSE 0
#define TRUE 1

void signal_handler_IO (int status);   /* definition of signal handler */
int open_port(char *serial_port, int iVerbose);
int configure_port(int fd);
int writeport(int fd, char *chars);
int readport(int fd, char *result);
int getbaud(int fd);
